//import cz.cvut.kadledav.paa.knapsack.bo.ComputedInstanceSolution;
//import cz.cvut.kadledav.paa.knapsack.bo.Instance;
//import cz.cvut.kadledav.paa.knapsack.bo.InstanceSolution;
//import cz.cvut.kadledav.paa.knapsack.tasks.BruteForceTask;
//import cz.cvut.kadledav.paa.knapsack.util.KnapsackFileReadUtil;
//import cz.cvut.kadledav.paa.knapsack.util.TaskUtil;
//
//import java.io.IOException;
//import java.util.ArrayList;
//import java.util.List;
//import java.util.Map;
//
///**
// * User: David Kadlecek
// * Date: 2.10.13
// */
//public class RunTest {
//
//    public static void main(String[] args) throws IOException {
//
//        int number = 27;
//
//        String path = "instances/knap_"+number+".inst.dat";
//        String pathSolutions = "solutions/knap_"+number+".sol.dat";
//        List<Instance> instances = KnapsackFileReadUtil.readInstances(path);
//        System.out.println("reading instance files done");
//        List<ComputedInstanceSolution> computedSolutions = new ArrayList<>();
//        for (Instance instance : instances) {
////            if(instance.getInstanceId() == 9001){
//                computedSolutions.add(TaskUtil.measureTask(instance, BruteForceTask.class, params));
////            }
//        }
//        System.out.println("computing is done");
//
//        Map<Integer,InstanceSolution> solutionMap = KnapsackFileReadUtil.readSolutions(pathSolutions);
//        for (ComputedInstanceSolution computedSolution : computedSolutions) {
//            InstanceSolution solution = solutionMap.get(computedSolution.getInstanceId());
//            if(!computedSolution.isSameAsGiven(solution)){
//                throw new RuntimeException("Error in compared solution for instance "+computedSolution.getInstanceId());
//            }
//        }
//        System.out.println("All work is done");
//
//    }
//}
